
<template>
  <p-drawer
    width="60%"
    placement="right"
    ref="drawerDom"
    :closable="false"
    :visible="visible"
    @close="onClose"
  >
    <div class="drawer">
      <p-tabs default-active-key="1">
        <p-tab-pane key="1" tab="异常记录">
          <p-descriptions title="异常记录" layout="vertical" bordered size="small">
            <p-descriptions-item label="异常记录单号">{{item.abnormalRecordNo}}</p-descriptions-item>
            <p-descriptions-item label="车间">{{item.workroomname}}</p-descriptions-item>
            <p-descriptions-item label="车间编码">{{item.workroomno}}</p-descriptions-item>
            <p-descriptions-item label="线体">{{item.linename}}</p-descriptions-item>
            <p-descriptions-item label="线体编码">{{item.lineno}}</p-descriptions-item>
            <p-descriptions-item label="班组">{{item.classname}}</p-descriptions-item>
            <p-descriptions-item label="班组编码">{{item.classno}}</p-descriptions-item>
            <p-descriptions-item label="工序工单号">{{item.processbillno}}</p-descriptions-item>
            <p-descriptions-item label="二级工序编码">{{item.processTwocode}}</p-descriptions-item>
            <p-descriptions-item label="二级工序名称">{{item.processTwoname}}</p-descriptions-item>
            <p-descriptions-item label="工站编码">{{item.workstationcode}}</p-descriptions-item>
            <p-descriptions-item label="工站名称 ">{{item.workstationname}}</p-descriptions-item>
            <p-descriptions-item label="问题大类">{{item.problemBig}}</p-descriptions-item>
            <p-descriptions-item label="问题小类">{{item.problemSmall}}</p-descriptions-item>
            <p-descriptions-item label="问题等级">{{item.problemLevel}}</p-descriptions-item>
            <p-descriptions-item label="问题数量">{{item.problemNumber}}</p-descriptions-item>
            <p-descriptions-item label="负责人内码">{{item.handlerId}}</p-descriptions-item>
            <p-descriptions-item label="责任人工号">{{item.handlerNo}}</p-descriptions-item>
            <p-descriptions-item label="责任人">{{item.handlerName}}</p-descriptions-item>
            <p-descriptions-item label="记录人 ">{{item.recordBy}}</p-descriptions-item>
            <p-descriptions-item label="记录时间">{{item.recordTime}}</p-descriptions-item>
            <p-descriptions-item label="问题点描述">{{item.problemDescribe}}</p-descriptions-item>
          </p-descriptions>

        </p-tab-pane>
      </p-tabs>

      
    </div>
  </p-drawer>
</template>

<script>
import { getAction } from "@/api/manage";
export default {
  components: {},
  props: {
    drawerUrl: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    //这里存放数据
    return {
      visible: false,
      loading: true,
      item:{},
    };
  },

  //监听属性 类似于data概念
  computed: {
   
  },
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    scrollFrom: function (scroll) {
       console.log(scroll)
      if (document.body.offsetWidth*0.6 < this[scroll].columns.length * 150) {
        return { x: this[scroll].columns.length * 150 };
      }
    },
    showDrawer(val) {
      this.visible = true;
      this.tableTabs = [];
      this.item = val
      this.loading = true
      // 加载子表数据
      if (val.id) {
        let params = { id: val.id }
      }
    },
    onClose() {
      this.visible = false;
    },
  },
};
</script>
<style  scoped  lang="less" >
/deep/ .poros-table-thead > tr > th {
  padding: 5px;
  box-sizing: border-box;
  font-size: 12px;
}
/deep/ .drawer .poros-descriptions-item-label{
  font-weight: bold;
}
</style>

